import AnimationService from '../service/animation-service';
import * as Koa from 'koa';

class AnimationController {
  private service: AnimationService = new AnimationService();

  // 添加
  addAnimation = async (ctx: Koa.Context) => {
    await this.service.addAnimation(ctx);
  };

  // 删除
  delAnimation = async (ctx: Koa.Context) => {
    await this.service.delAnimation(ctx);
  };

  // 修改
  updateAnimation = async (ctx: Koa.Context) => {
    await this.service.updateAnimation(ctx);
  };

  // 查询
  searchAnimation = async (ctx: Koa.Context) => {
    await this.service.searchAnimation(ctx);
  };
}

export default new AnimationController();
